package com.gz.EuchreU.Contants;

import org.anddev.andengine.engine.Engine;

import android.app.Activity;
import android.util.Log;

import com.gz.EuchreU.GameActivity;
import com.gz.EuchreU.Helpers.Textures;

public class UI {
	private static float mScreenWidth = 480;
	private static float mScreenHeight = 320;
	private static GameActivity mGame;
	private static String mLoadState = "";
	private static Textures mTextures;
	private static float mCardWidth;
	private static float mCardHeight;
	private static boolean mScoreBoardTouched = false;
	
	
	
	public static GameActivity GetGame(){
		return mGame;
	}
	
	public static void setActivity(GameActivity pGame, float pWidth, float pHeight){
		mGame = pGame;
		mScreenHeight = pHeight;
		mScreenWidth = pWidth;
		mCardWidth = mScreenWidth/13;
		mCardHeight = mCardWidth;
		
		GameOptions.GetDefaults();
	}
	
	public static void setScoreBoardTouched(boolean pTouched){
		mScoreBoardTouched = pTouched;
		log("Set scoreboard touch - " + pTouched);
	}
	
	public static boolean IsScoreBoardTouched(){
		return mScoreBoardTouched;
	}
	
	public static float getWidth(){
		return mScreenWidth;
	}
	
	public static float getHeight(){
		return mScreenHeight;
	}

	public static float getCardWidth(){
		return mCardWidth;
	}
	
	public static float getCardHeight(){
		return mCardHeight;
	}
	
	public static void setLoadState(String msg){
		mLoadState = msg;
	}
	
	public static String getLoadState(){
		return mLoadState;
	}
	
	public static Textures getTextures(){
		return mTextures;
	}
	
	public static void LoadTextures(Engine pEngine){
		mTextures = new Textures(pEngine);
		mCardHeight = mTextures.getHeightFromWidthTiled(Suits.CLUBS, CardValues.ACE, getCardWidth());
	}
	
	
	
	
	
	private static void log(String msg){
		Log.d("UI", msg);
	}
}
